(function (global, factory, isUndefined) { window.startup = { ready: function (callback) { var cb = callback || function () {}; !function(t, e, i) { function n() { e.addEventListener ? e.removeEventListener("DOMContentLoaded", s) : e.detachEvent("onreadystatechange", s) } function s() { (e.addEventListener || "load" === event.type || "complete" === e.readyState) && (n(), i()) } function r() { e.addEventListener ? e.addEventListener("DOMContentLoaded", s) : e.attachEvent("onreadystatechange", s) } i = i || function() {}, r() }(window, document, function() { cb(); }); } }; window.ApiDomain = { current: (function () { var winPageServer = (function () { var r = false; if (window.hasOwnProperty('UIPage') && window.UIPage.hasOwnProperty('server') && window.UIPage.server.hasOwnProperty('fo-current')) { r = true; } return r; })(); var port = window.location.port; var origin = window.location.origin; return winPageServer ? window.UIPage.server['fo-current'] : ((port == '82') || (origin.indexOf('dalgona') != -1)) ? 'https://dev-www.elandmall.co.kr' : origin; })(), www: (function () { var winPageServer = (function () { var r = false; if (window.hasOwnProperty('UIPage') && window.UIPage.hasOwnProperty('server') && window.UIPage.server.hasOwnProperty('fo-web')) { r = true; } return r; })(); var port = window.location.port; var origin = window.location.origin; return winPageServer ? origin : ((port == '82') || (origin.indexOf('dalgona') != -1)) ? 'https://dev-www.elandmall.co.kr' : origin; })() }; var LOCAL_TEST = (function () { var port = window.location.port; var origin = window.location.origin; return ((port == '82') || (origin.indexOf('dalgona') != -1)); })(); if (LOCAL_TEST) { $.ajaxSetup({ beforeSend: function (xhr, settings) { if ((settings.url[0] == '/') && (settings.url.indexOf('/html/') != 0)) { settings.url = window.ApiDomain.www + settings.url; } } }); }; var win = window; var support; var calcSupport = function () { var win = window; var doc = win.document; return { smoothScroll: doc.documentElement && 'scrollBehavior' in doc.documentElement.style, touch: !!('ontouchstart' in win || win.DocumentTouch && doc instanceof win.DocumentTouch) }; }; var getSupport = function () { if (!support) { support = calcSupport(); } return support; }; window.gUtil = { isObject: function (o) { return typeof o === 'object' && o !== null && o.constructor && o.constructor === Object; }, def: function () { var args = [], len$1 = arguments.length; while ( len$1-- ) args[ len$1 ] = arguments[ len$1 ]; var to = Object(args[0]); for (var i = 1; i < args.length; i += 1) { var nextSource = args[i]; if (nextSource !== undefined && nextSource !== null) { var keysArray = Object.keys(Object(nextSource)); for (var nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex += 1) { var nextKey = keysArray[nextIndex]; var desc = Object.getOwnPropertyDescriptor(nextSource, nextKey); if (desc !== undefined && desc.enumerable) { if (this.isObject(to[nextKey]) && this.isObject(nextSource[nextKey])) { this.def(to[nextKey], nextSource[nextKey]); } else if (!this.isObject(to[nextKey]) && this.isObject(nextSource[nextKey])) { to[nextKey] = {}; this.def(to[nextKey], nextSource[nextKey]); } else { to[nextKey] = nextSource[nextKey]; } } } } } return to; }, convertHtml: function (str) { var plainText = str; if (plainText != '') { var source = ["&","<",">",""","'","/","(",")","%","-"]; var target = ["&", "<", ">", "\"", "'", "/", "(", ")", "%", "-"]; for (var i = 0; i < source.length; i++) { var cTxt = source[i]; if (plainText.indexOf(cTxt) > -1) { var regexAllCase = new RegExp(cTxt, "gi"); plainText = plainText.replace(regexAllCase, target[i]); } } } return plainText; }, escapeHtml: function (str) { var map = { '&': '&', '<': '<', '>': '>', '"': '"', "'": ''', '/': '/', '`': '`', '=': '=' }; return str.replace(/[&<>"'`=\/]/g, function(m) { return map[m]; }); }, validator: { isObject: function (o) { return typeof o === 'object' && o !== null && o.constructor && o.constructor === Object; }, store: function (props, _defaultValue) { var _this = this; var done = function () { if (_defaultValue != isUndefined) { return _defaultValue; } else { if (props.defaultValue != isUndefined) { return props.defaultValue; } } }; if ((props.condition != isUndefined) && props.condition) { if ((props.get != isUndefined) && (typeof props.get === 'function')) { try { var _get = props.get(); if (_get == isUndefined) { return done(); } else { return _get; } } catch (error) { console.log(error); return done(); } } else { return done(); } } else { if (props.getScopeChaningEnd != isUndefined) { try { var aObj = props.getScopeChaningEnd(); var hasKey = true; var chaining; aObj.forEach(function (_value, idx) { if (idx == 0) { if (typeof _value == 'string') { chaining = win[_value]; } else if(_this.isObject(_value)) { chaining = _value; } } else { if (chaining != isUndefined) { chaining = chaining[_value]; } } if (!_this.hasKey(chaining)) { hasKey = false; } }); if (hasKey) { if (typeof chaining == 'function') { return chaining(); } else { return chaining; } } else { return done(); } } catch (error) { console.log(error); return done(); } } else { return done(); } } }, hasKey: function (obj) { return obj != isUndefined; } }, Device: (function () { var support = getSupport(); var platform = win.navigator.platform; var ua = win.navigator.userAgent; var device = { ios: false, android: false, androidChrome: false, desktop: false, iphone: false, ipod: false, ipad: false, edge: false, ie: false, firefox: false, macos: false, windows: false, cordova: !!(win.cordova || win.phonegap), phonegap: !!(win.cordova || win.phonegap), electron: false, }; var screenWidth = win.screen.width; var screenHeight = win.screen.height; var android = ua.match(/(Android);?[\s\/]+([\d.]+)?/); // eslint-disable-line var ipad = ua.match(/(iPad).*OS\s([\d_]+)/); var ipod = ua.match(/(iPod)(.*OS\s([\d_]+))?/); var iphone = !ipad && ua.match(/(iPhone\sOS|iOS)\s([\d_]+)/); var ie = ua.indexOf('MSIE ') >= 0 || ua.indexOf('Trident/') >= 0; var edge = ua.indexOf('Edge/') >= 0; var firefox = ua.indexOf('Gecko/') >= 0 && ua.indexOf('Firefox/') >= 0; var windows = platform === 'Win32'; var electron = ua.toLowerCase().indexOf('electron') >= 0; var macos = platform === 'MacIntel'; // iPadOs 13 fix if (!ipad && macos && support.touch && ( (screenWidth === 1024 && screenHeight === 1366) // Pro 12.9 || (screenWidth === 834 && screenHeight === 1194) // Pro 11 || (screenWidth === 834 && screenHeight === 1112) // Pro 10.5 || (screenWidth === 768 && screenHeight === 1024) // other ) ) { ipad = ua.match(/(Version)\/([\d.]+)/); macos = false; } device.ie = ie; device.edge = edge; device.firefox = firefox; // Android if (android && !windows) { device.os = 'android'; device.osVersion = android[2]; device.android = true; device.androidChrome = ua.toLowerCase().indexOf('chrome') >= 0; } if (ipad || iphone || ipod) { device.os = 'ios'; device.ios = true; } // iOS if (iphone && !ipod) { device.osVersion = iphone[2].replace(/_/g, '.'); device.iphone = true; } if (ipad) { device.osVersion = ipad[2].replace(/_/g, '.'); device.ipad = true; } if (ipod) { device.osVersion = ipod[3] ? ipod[3].replace(/_/g, '.') : null; device.ipod = true; } // iOS 8+ changed UA if (device.ios && device.osVersion && ua.indexOf('Version/') >= 0) { if (device.osVersion.split('.')[0] === '10') { device.osVersion = ua.toLowerCase().split('version/')[1].split(' ')[0]; } } // Webview device.webView = !!((iphone || ipad || ipod) && (ua.match(/.*AppleWebKit(?!.*Safari)/i) || win.navigator.standalone)) || (win.matchMedia && win.matchMedia('(display-mode: standalone)').matches); device.webview = device.webView; device.standalone = device.webView; // Desktop device.desktop = !(device.ios || device.android) || electron; if (device.desktop) { device.electron = electron; device.macos = macos; device.windows = windows; if (device.macos) { device.os = 'macos'; } if (device.windows) { device.os = 'windows'; } } // Pixel Ratio device.pixelRatio = win.devicePixelRatio || 1; // Export object return device; }()) }; window.eAjax = { defParams: { type: 'GET', cache: false, data: {}, dataType: 'json', xhrFields: {withCredentials: true}, 'X-Requested-With': 'XMLHttpRequest' }, post: function (args) { var defParams = { type: 'POST', cache: false, data: {}, dataType: 'json', xhrFields: {withCredentials: true}, 'X-Requested-With': 'XMLHttpRequest' }; var opt = gUtil.def({}, defParams, (args || {})); if ((opt.dataType != isUndefined) && (opt.dataType == 'html')) { opt.url = this.buildURL(opt); } opt.headers = {'x-render': window.location.origin}; return $.ajax(opt); }, get: function (args) { var opt = gUtil.def({}, this.defParams, (args || {})); if ((opt.dataType != isUndefined) && (opt.dataType == 'html')) { opt.url = this.buildURL(opt); } opt.headers = {'x-render': window.location.origin}; return $.ajax(opt); }, buildURL: function (opt) { var buildURL = opt.url; var paramCustom = (function () { var paths = {}; var search = window.location.search.replace('?', '').trim(); if (search.length) { var aSearch = search.split('&'); aSearch = aSearch.filter(function (val) { return val.length; }); aSearch.forEach(function (val) { var option = val, keyVal = option.split('='); paths[keyVal[0]] = keyVal[1]; }); } return paths; })(); if (paramCustom.hasOwnProperty('mediaDcode') && (paramCustom.mediaDcode == '30')) { var href = opt.url; var hasSearch = href.indexOf('?') != -1; var pathname = href; var params = (function () { var a = []; var o = {}; return { a: a, o: o } })(); if (hasSearch) { var aSearch = href.split('?'); pathname = aSearch[0]; var search = aSearch[1]; var aScore = search.split('&'); aScore = aScore.filter(function (v) { return v.length; }); params = (function () { var a = []; var o = {}; aScore.forEach(function (sv) { var as = sv.split('='); a.push(as[0]); o[as[0]] = as[1]; }); return { a: a, o: o } })(); } if (!params.o.hasOwnProperty('mediaDcode')) { params.a.push('mediaDcode'); } params.o['mediaDcode'] = paramCustom['mediaDcode']; var aFinal = params.a.map(function (pa) { return pa + '=' + params.o[pa]; }); aFinal = aFinal.filter(function (v) { return v.length; }); buildURL = pathname + '?' + aFinal.join('&'); } return buildURL; } }; factory(); }(this, function () { 'use strict'; var Component = (function (isUndefined) { var support; var calcSupport = function () { var win = window; var doc = win.document; return { smoothScroll: doc.documentElement && 'scrollBehavior' in doc.documentElement.style, touch: !!('ontouchstart' in win || win.DocumentTouch && doc instanceof win.DocumentTouch) }; }; var getSupport = function () { if (!support) { support = calcSupport(); } return support; }; var win = window, doc = win.document, Util = { isDevice: (function () { var isDevice = ('ontouchstart' in win || (win.DocumentTouch && doc instanceof win.DocumentTouch)); isDevice ? $('html').addClass('isTouchDevice') : $('html').addClass('isNotTouchDevice'); return isDevice; })(), pointerEvents: !!win.PointerEvent && ('maxTouchPoints' in win.navigator) && win.navigator.maxTouchPoints >= 0, Device: (function () { var support = getSupport(); var platform = win.navigator.platform; var ua = win.navigator.userAgent; var device = { ios: false, android: false, androidChrome: false, desktop: false, iphone: false, ipod: false, ipad: false, edge: false, ie: false, firefox: false, macos: false, windows: false, cordova: !!(win.cordova || win.phonegap), phonegap: !!(win.cordova || win.phonegap), electron: false, }; var screenWidth = win.screen.width; var screenHeight = win.screen.height; var android = ua.match(/(Android);?[\s\/]+([\d.]+)?/); // eslint-disable-line var ipad = ua.match(/(iPad).*OS\s([\d_]+)/); var ipod = ua.match(/(iPod)(.*OS\s([\d_]+))?/); var iphone = !ipad && ua.match(/(iPhone\sOS|iOS)\s([\d_]+)/); var ie = ua.indexOf('MSIE ') >= 0 || ua.indexOf('Trident/') >= 0; var edge = ua.indexOf('Edge/') >= 0; var firefox = ua.indexOf('Gecko/') >= 0 && ua.indexOf('Firefox/') >= 0; var windows = platform === 'Win32'; var electron = ua.toLowerCase().indexOf('electron') >= 0; var macos = platform === 'MacIntel'; // iPadOs 13 fix if (!ipad && macos && support.touch && ( (screenWidth === 1024 && screenHeight === 1366) // Pro 12.9 || (screenWidth === 834 && screenHeight === 1194) // Pro 11 || (screenWidth === 834 && screenHeight === 1112) // Pro 10.5 || (screenWidth === 768 && screenHeight === 1024) // other ) ) { ipad = ua.match(/(Version)\/([\d.]+)/); macos = false; } device.ie = ie; device.edge = edge; device.firefox = firefox; // Android if (android && !windows) { device.os = 'android'; device.osVersion = android[2]; device.android = true; device.androidChrome = ua.toLowerCase().indexOf('chrome') >= 0; } if (ipad || iphone || ipod) { device.os = 'ios'; device.ios = true; } // iOS if (iphone && !ipod) { device.osVersion = iphone[2].replace(/_/g, '.'); device.iphone = true; } if (ipad) { device.osVersion = ipad[2].replace(/_/g, '.'); device.ipad = true; } if (ipod) { device.osVersion = ipod[3] ? ipod[3].replace(/_/g, '.') : null; device.ipod = true; } // iOS 8+ changed UA if (device.ios && device.osVersion && ua.indexOf('Version/') >= 0) { if (device.osVersion.split('.')[0] === '10') { device.osVersion = ua.toLowerCase().split('version/')[1].split(' ')[0]; } } // Webview device.webView = !!((iphone || ipad || ipod) && (ua.match(/.*AppleWebKit(?!.*Safari)/i) || win.navigator.standalone)) || (win.matchMedia && win.matchMedia('(display-mode: standalone)').matches); device.webview = device.webView; device.standalone = device.webView; // Desktop device.desktop = !(device.ios || device.android) || electron; if (device.desktop) { device.electron = electron; device.macos = macos; device.windows = windows; if (device.macos) { device.os = 'macos'; } if (device.windows) { device.os = 'windows'; } } // Pixel Ratio device.pixelRatio = win.devicePixelRatio || 1; // Export object return device; }()), ready: function (callback) { var cb = callback || function () {}; !function(t, e, i) { function n() { e.addEventListener ? e.removeEventListener("DOMContentLoaded", s) : e.detachEvent("onreadystatechange", s) } function s() { (e.addEventListener || "load" === event.type || "complete" === e.readyState) && (n(), i()) } function r() { e.addEventListener ? e.addEventListener("DOMContentLoaded", s) : e.attachEvent("onreadystatechange", s) } i = i || function() {}, r() }(window, document, function() { cb(); }); }, cookie: { defParams: { expires: '', path: '/', domain: '', secure: '' }, set: function(cname, cvalue, exdays) { var d = new Date(); d.setTime(d.getTime() + ((exdays || 0) * 24 * 60 * 60 * 1000)); var opt = gUtil.def({}, this.defParams, { expires: d }); document.cookie = [ cname, '=', cvalue, opt.expires ? '; expires=' + opt.expires.toUTCString() : '', opt.path ? '; path=' + opt.path : '', opt.domain ? '; domain=' + opt.domain : '', opt.secure ? '; secure' : '' ].join(''); }, get: function(cname) { var name = cname + '=', ca = document.cookie.split(';'), c; for(var i=0, leng=ca.length; i"),t.push("[data-hm-btn] {text-align:right}"),t.push('[data-hm-btn] a {display:inline-flex;align-items:center;justify-content:center;vertical-align:top;width:66px;height:66px;background:red;border-radius:50%;font-size:12px;font-family:"Spoqa Han Sans Neo";color:#fff;text-align:center}'),t.push("[data-hm-btn].is-hide a {opacity:0;transform:scale(0.7);transition:all 300ms}"),t.push("[data-hm-btn].is-show a {opacity:1;transform:scale(1)}"),t.push(""),t.join("")},getBtn:function(){var t=[];return t.push('
HITMAP
'),t.join("")},build:function(){var e=this.getStyles(),s=a(e);i.append(s);var o=this.getBtn(),r=a(o);t.$mapBtn=r,t.$navRight.prepend(r),n.setTimeout(function(){r.addClass("is-show")},0)}}}),this.layout.build()},buildParams:function(){gUtil.def(this,{params:{state:{hitmapLoading:!1,hitmap:!1},staticDomain:function(){var t=gUtil.validator.store({getScopeChaningEnd:function(){return["UIPage","server","fo-static"]}},"https://static.elandrs.com/f");return t}(),hitmapLoaded:function(){if(!this.state.hitmapLoading&&!this.state.hitmap){this.state.hitmapLoading=!0;var t=this;a.cachedScript(this.staticDomain+"/html/apps/components/global/ui-library/mo/tech-js/hitmap/clientlibs/js/main.min.js").done(function(){t.state.hitmap=!0,t.state.hitmapLoading=!1}).fail(function(){t.state.hitmapLoading=!1})}}}})},changeEvents:function(t){var i=[],n=t.split(" ");for(var a in n)i.push(n[a]+this.opts.customEvent);return i.join(" ")},bindEvents:function(t){t?this.$mapBtn.on(this.changeEvents("click"),this.mapClick.bind(this)):this.$mapBtn.off(this.changeEvents("click"))},mapClick:function(t){t.preventDefault(),this.params.hitmapLoaded()},destroy:function(){this.bindEvents(!1)}},i}();return t});